﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UIWindows.GlobalStatics
{
    /// <summary>
    /// 全局静态变量
    /// </summary>
    public static class GlobalStatic
    {
        private static string _path = Environment.CurrentDirectory;

        public static string Log4NetPath { get => $"{_path}\\log4net.config"; }
        public static string ConfigPath { get => $"{_path}\\config"; }
        public static string DevicePath { get => $"{ConfigPath}\\device.txt"; }
        public static string ST5520Path { get => $"{ConfigPath}\\DeviceInit\\ST5520.txt"; }
        public static string RJ6902RPath { get => $"{ConfigPath}\\DeviceInit\\RJ6902R.txt"; }
        public static string ParameterPath { get => $"{ConfigPath}\\parameter.txt"; }
        public static string HomePath { get => $"{ConfigPath}\\home.txt"; }
        public static string SystemConfigPath { get => $"{ConfigPath}\\systemconfig.txt"; }
        public static string TopicsPath { get => $"{ConfigPath}\\topics.txt"; }
        public static string UserPath { get => $"{ConfigPath}\\user.txt"; }
        public static string RolePath { get => $"{ConfigPath}\\role.txt"; }
        public static string ExportDataPath { get => $"{Environment.CurrentDirectory.Substring(0, 2)}\\Export"; }
        public static string YieldPath { get => $"{ConfigPath}\\yield.txt"; }
        public static string EquipmentTimePath { get => $"{ConfigPath}\\equipmentTime.txt"; }
        public static string ChartDataPath { get => $"{_path}\\chartDataPath.txt"; }
        public static string EquipmentFilePath { get => $"{_path}\\logs\\EquipmentTimeLog"; }
        public static string RoleInitPath { get => $"{_path}\\config\\roleinit.txt"; }
        public static string DisplayItemPath { get => $"{_path}\\config\\displayitem.txt"; }
        public static string DES_KEY { get => "12560695"; }
        public static string DES_IV { get => "k164s453"; }

        public static string RJ6901APath { get => $"{ConfigPath}\\DeviceInit\\RJ6901A.txt"; }

        public static System.Text.Json.JsonSerializerOptions Options
        {
            get => new System.Text.Json.JsonSerializerOptions
            {
                Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping
            };
        }

        public static int BooleanCount { get; set; }
    }
}
